今天執行 w3school的練習題
在HTML head內加上 jQuery CDN 及 script
<script
  src="https://code.jquery.com/jquery-3.4.1.js"
  integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
  crossorigin="anonymous"></script>
  
  <script type="text/javascript">
$(document).ready(function(){
  $("#b01").click(function(){
  htmlobj=$.ajax({url:"/jquery/test1.txt",async:false});
  //url:"/jquery/test1.txt" 部份改為你存放的txt路徑
  $("#myDiv").html(htmlobj.responseText);
  });
});
</script>
body 裡加入
<div id="myDiv"><h2>通过 AJAX 改变文本</h2></div>
<button id="b01" type="button">改变内容</button>